/**
 * 
 */
package com.gragra.sampling.sequentialStructure.tests;
import static org.junit.Assert.*;
import org.junit.Test;
import com.gragra.sampling.sequentialStructure.ExtensionLevels;
import com.gragra.sampling.sequentialStructure.NumericalType;
/**
 * @author Christoph Teichmann
 * 02.06.2013
 */
public class TestNumericalType
{
	/**
	 * Test method for {@link com.gragra.sampling.sequentialStructure.NumericalType#getLevel()}.
	 */
	@Test
	public void testGetLevel()
	{assertEquals(NumericalType.LeadingNumbers.getLevel(),ExtensionLevels.NumericalLevel);}
	/**
	 * Test method for {@link com.gragra.sampling.sequentialStructure.NumericalType#getNumber()}.
	 */
	@Test
	public void testGetNumber()
	{
		int num1 = NumericalType.LeadingNumbers.getNumber();
		int num2 = NumericalType.LeadingNumbers.getNumber();
		int num3 = NumericalType.NoNumbers.getNumber();
		assertEquals(num1,num2);
		assertFalse(num1==num3);
	}
	/**
	 * Test method for {@link com.gragra.sampling.sequentialStructure.NumericalType#classify(java.lang.String)}.
	 */
	@Test
	public void testClassify()
	{
		String one = "34th";
		String two = "num54";
		String three = "528098";
		String four = "mn345n,m";
		String five = "345skflk345sd";
		String six = "asdaf";
		assertEquals(NumericalType.LeadingNumbers,NumericalType.classify(one));
		assertEquals(NumericalType.TrailingNumbers,NumericalType.classify(two));
		assertEquals(NumericalType.InternalNumbers,NumericalType.classify(four));
		assertEquals(NumericalType.NoNumbers,NumericalType.classify(six));
		assertEquals(NumericalType.AllNumbers,NumericalType.classify(three));
		assertEquals(NumericalType.LeadingNumbers,NumericalType.classify(five));
	}
}